package com.tangcco.lockwell.test;


import java.util.List;


public class Question {

    // 对应JSON中每个"question"元素里的"question_index"字段，用于标识题目的序号等
    private Integer question_index;
    // 对应JSON中每个"question"元素里的"question_title"字段，题目标题相关内容
    private String question_title;
    // 对应JSON中每个"question"元素里的"options"字段，题目选项列表
    private List<String> options;
    // 对应JSON中每个"question"元素里的"correctAnswer"字段，题目的正确答案
    private String correctAnswer;

    // 默认构造函数，供框架使用等情况
    public Question() {
    }

    // 自定义构造函数，方便根据各个属性初始化Question对象
    public Question(int question_index, String question_title, List<String> options, String correctAnswer) {
        this.question_index = question_index;
        this.question_title = question_title;
        this.options = options;
        this.correctAnswer = correctAnswer;
    }

    // 获取题目的序号
    public int getQuestion_index() {
        return question_index;
    }

    // 设置题目的序号
    public void setQuestion_index(int question_index) {
        this.question_index = question_index;
    }

    // 获取题目的标题
    public String getQuestion_title() {
        return question_title;
    }

    // 设置题目的标题
    public void setQuestion_title(String question_title) {
        this.question_title = question_title;
    }

    // 获取题目的选项列表
    public List<String> getOptions() {
        return options;
    }

    // 设置题目的选项列表
    public void setOptions(List<String> options) {
        this.options = options;
    }

    // 获取题目的正确答案
    public String getCorrectAnswer() {
        return correctAnswer;
    }

    // 设置题目的正确答案
    public void setCorrectAnswer(String correctAnswer) {

        this.correctAnswer = correctAnswer;
    }

    @Override
    public String toString() {
        return "Question{" +

                ", question_index=" + question_index +
                ", question_title='" + question_title + '\'' +
                ", options=" + options +
                ", correctAnswer='" + correctAnswer + '\'' +
                '}';
    }
}